<!DOCTYPE html>
<html lang="zh">
<head>
  <!-- 元数据 -->
  <meta charset="utf-8">
  <link rel="icon" href="/blog/images/favicon.ico">
  <title>集合 | YongKJ</title>
  <meta name="author" content="yongkj" />
  <meta http-equiv="Cache-Control" content="no-transform" />
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="robots" content="index,follow" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  <meta name="format-detection" content="telphone=no, email=no" />
  
    
      <meta name="description" itemprop="description" content="Pursue excellence and success will follow." />
    
  
  <meta name="description" content="集合的分类123456789101112131415161718Collection 接口的接口 对象的集合（单列集合）├——-List 接口：元素按进入先后有序保存，可重复│—————-├ LinkedList 接口实现类， 链表， 插入删除， 没有同步， 线程不安全│—————-├ ArrayList 接口实现类， 数组， 随机访问， 没有同步， 线程不安全│—————-└ Vector 接口">
<meta property="og:type" content="article">
<meta property="og:title" content="集合">
<meta property="og:url" content="https://yongkj.gitee.io/blog/2021/01/29/java-assemble/index.html">
<meta property="og:site_name" content="YongKJ">
<meta property="og:description" content="集合的分类123456789101112131415161718Collection 接口的接口 对象的集合（单列集合）├——-List 接口：元素按进入先后有序保存，可重复│—————-├ LinkedList 接口实现类， 链表， 插入删除， 没有同步， 线程不安全│—————-├ ArrayList 接口实现类， 数组， 随机访问， 没有同步， 线程不安全│—————-└ Vector 接口">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://yongkj.gitee.io/blog/2021/01/29/java-assemble/05-2.png">
<meta property="article:published_time" content="2021-01-29T12:38:52.000Z">
<meta property="article:modified_time" content="2021-02-10T08:01:13.943Z">
<meta property="article:author" content="yongkj">
<meta property="article:tag" content="数组">
<meta property="article:tag" content="链表">
<meta property="article:tag" content="元素">
<meta property="article:tag" content="同步">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://yongkj.gitee.io/blog/2021/01/29/java-assemble/05-2.png">
<meta name="twitter:site" content="@Candiinya">
  <link rel="alternate" href="atom.xml" type="application/atom+xml">
  <!-- 站点验证相关 -->
  
    
    
    
  
  <!-- 样式表文件 -->
  <link rel="stylesheet" id="kratos-css" href="/blog/css/kratosr.min.css" type="text/css" media="all">
  <link rel="stylesheet" id="highlight-css" href="/blog/css/highlight.min.css" type="text/css" media="all">
  <link rel="stylesheet" id="fontawe-css" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" type="text/css" media="all">
  <link rel="stylesheet" id="nprogress-css" href="https://cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.css" type="text/css" media="all">
  
  
  
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css">
  
  
    <link rel="stylesheet" id="darkmode-css" href="/blog/css/kr-dark.min.css" type="text/css" media="all">
  
  <!-- 不得不预先加载的一些JS文件 -->
  <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script>
  
    <script src="https://cdn.jsdelivr.net/npm/qrcode_js@1.0.0/qrcode.min.js"></script>
  
  
<meta name="generator" content="Hexo 5.2.0"></head>


    <body class="custom-background">
        <div id="kratos-wrapper">
    <div id="kratos-page">
        <div id="kratos-header">
            <div class="nav-toggle"><a class="kratos-nav-toggle js-kratos-nav-toggle"><i></i></a></div>
            <header id="kratos-header-section">
                <div class="container">
                    <div class="nav-header">
                        <div class="color-logo"><a href="/blog/">YongKJ</a></div>
                        <nav id="kratos-menu-wrap">
                            <ul id="kratos-primary-menu" class="sf-menu">
                            
                            
                                <li><a href="/blog/"><i class="fa fa-home"></i>首页</a></li>
                            
                            
                            
                                <li><a href="/blog/archives/"><i class="fa fa-file"></i>档案馆</a></li>
                            
                            
                            
                                <li>
                                <a><i class="fa fa-link"></i>链接</a>
                                <ul class="sub-menu">
                                    
                                    
                                    
                                    
                                        <li><a target="_blank" rel="noopener" href="http://software.yongkj.cn/software/">软件俱乐部</a></li>
                                    
                                    
                                    
                                        <li><a target="_blank" rel="noopener" href="http://pocketyun.yongkj.cn/">袖珍网盘吧</a></li>
                                    
                                    
                                    
                                        <li><a target="_blank" rel="noopener" href="http://study.yongkj.cn/">英语随身学</a></li>
                                    
                                    
                                </ul>
                                </li>
                            
                            
                            
                                <li><a href="/blog/atom.xml"><i class="fa fa-rss"></i>RSS 订阅</a></li>
                            
                            
                            
                                <li><a href="/blog/about/"><i class="fa fa-paper-plane"></i>关于我</a></li>
                            
                            
                            </ul>
                        </nav>
                    </div>
                </div>
            </header>
        </div>
        <div class="kratos-start kratos-hero-2">
            <!-- <div class="kratos-overlay"></div> -->
            <div class="kratos-cover kratos-cover-2 text-center">
                <div class="desc desc2 animate-box">
                    <a href="/blog/"><h2>YongKJ</h2><br><span>勇往直前，永不言弃</span></a>
                </div>
            </div>
        </div>

        <div id="kratos-blog-post">
            <div class="container">
                    <div class="row">
                        
        <div id="main">
            <section class="col-md-8">
    <article>
        <div class="kratos-hentry kratos-post-inner clearfix">
            <header class="kratos-entry-header">
                <h1 class="kratos-entry-title text-center">集合</h1>
                
                <div class="kratos-post-meta text-center">
                    <span>
                        <i class="fa fa-calendar"></i> 2021-01-29
                        <i class="fa fa-folder"></i> 分类于 <a class="label-link" href="/blog/categories/Java%E5%AD%A6%E4%B9%A0/">Java学习</a>
                        <i class="fa fa-user"></i> 作者 yongkj
                        <i class="fa fa-edit"></i> 
                        
                        
                            ~2.25K
                        
                        字
                        
                    </span>
                </div>
            </header>
            <div class="kratos-post-content">
                
                    <div class="kratos-post-inner-toc">
                        <ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%9B%86%E5%90%88%E7%9A%84%E5%88%86%E7%B1%BB"><span class="toc-number">1.</span> <span class="toc-text">集合的分类</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#List%E3%80%81Map%E3%80%81Set-%E6%8E%A5%E5%8F%A3%E5%AD%98%E5%8F%96%E5%85%83%E7%B4%A0%E7%89%B9%E7%82%B9"><span class="toc-number">2.</span> <span class="toc-text">List、Map、Set  接口存取元素特点</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Collection-%E5%92%8C-Collections-%E7%9A%84%E5%8C%BA%E5%88%AB"><span class="toc-number">3.</span> <span class="toc-text">Collection 和 Collections 的区别</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#ArrayList-%E5%92%8C-LinkedList-%E7%9A%84%E5%8C%BA%E5%88%AB"><span class="toc-number">4.</span> <span class="toc-text">ArrayList 和 LinkedList 的区别</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#HashMap-%E5%92%8C-Hashtable-%E7%9A%84%E5%8C%BA%E5%88%AB"><span class="toc-number">5.</span> <span class="toc-text">HashMap 和 Hashtable 的区别</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Iterator-%E5%92%8C-ListIterator-%E7%9A%84%E5%8C%BA%E5%88%AB"><span class="toc-number">6.</span> <span class="toc-text">Iterator 和 ListIterator 的区别</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Java%E9%9B%86%E5%90%88%E7%B1%BB%E9%87%8C%E9%9D%A2%E6%9C%80%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%8E%A5%E5%8F%A3"><span class="toc-number">7.</span> <span class="toc-text">Java集合类里面最基本的接口</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#ConcurrentHashMap"><span class="toc-number">8.</span> <span class="toc-text">ConcurrentHashMap</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#TreeMap"><span class="toc-number">9.</span> <span class="toc-text">TreeMap</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#HashMap"><span class="toc-number">10.</span> <span class="toc-text">HashMap</span></a></li></ol>
                    </div>
                
                <hr />
                <h3 id="集合的分类"><a href="#集合的分类" class="headerlink" title="集合的分类"></a>集合的分类</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">Collection 接口的接口 对象的集合（单列集合）</span><br><span class="line">├——-List 接口：元素按进入先后有序保存，可重复</span><br><span class="line">│—————-├ LinkedList 接口实现类， 链表， 插入删除， 没有同步， 线程不安全</span><br><span class="line">│—————-├ ArrayList 接口实现类， 数组， 随机访问， 没有同步， 线程不安全</span><br><span class="line">│—————-└ Vector 接口实现类 数组， 同步， 线程安全</span><br><span class="line">│ ———————-└ Stack 是Vector类的实现类</span><br><span class="line">└——-Set 接口： 仅接收一次，不可重复，并做内部排序</span><br><span class="line">├—————-└HashSet 使用hash表（数组）存储元素</span><br><span class="line">│————————└ LinkedHashSet 链表维护元素的插入次序</span><br><span class="line">└ —————-TreeSet 底层实现为二叉树，元素排好序</span><br><span class="line"></span><br><span class="line">Map 接口 键值对的集合 （双列集合）</span><br><span class="line">├———Hashtable 接口实现类， 同步， 线程安全</span><br><span class="line">├———HashMap 接口实现类 ，没有同步， 线程不安全</span><br><span class="line">│—————–├ LinkedHashMap 双向链表和哈希表实现</span><br><span class="line">│—————–└ WeakHashMap</span><br><span class="line">├ ——–TreeMap 红黑树对所有的key进行排序</span><br><span class="line">└———IdentifyHashMap</span><br></pre></td></tr></table></figure>

<h3 id="List、Map、Set-接口存取元素特点"><a href="#List、Map、Set-接口存取元素特点" class="headerlink" title="List、Map、Set  接口存取元素特点"></a>List、Map、Set  接口存取元素特点</h3><ol>
<li><p>List 以特定索引来存取元素，可以有重复元素。</p>
</li>
<li><p>Set 不能存放重复元素（用对象的equals()方法来区分元素是否重复）。</p>
</li>
<li><p>Map 保存键值对（key-value pair）映射，映射关系可以是一对一或多对一。</p>
</li>
</ol>
<h3 id="Collection-和-Collections-的区别"><a href="#Collection-和-Collections-的区别" class="headerlink" title="Collection 和 Collections 的区别"></a>Collection 和 Collections 的区别</h3><ol>
<li>Collection是集合类的上级接口，继承与它的接口主要有Set 和 List.</li>
<li>Collections是针对集合类的一个帮助类，它提供一系列静态方法实现对各种集合的搜索、排序、线程安全化等操作。</li>
</ol>
<h3 id="ArrayList-和-LinkedList-的区别"><a href="#ArrayList-和-LinkedList-的区别" class="headerlink" title="ArrayList 和 LinkedList 的区别"></a>ArrayList 和 LinkedList 的区别</h3><ol>
<li>ArrayList 和 LinkedList 都实现了List接口</li>
<li>ArrayList是实现了基于动态数组的数据结构，LinkedList实现了基于链表的数据结构。</li>
<li>对于随机访问get和set，ArrayList绝对优于LinkedList，因为LinkedList要移动指针。</li>
<li>对于新增和删除操作add和remove，LinedList比较占优势，因为ArrayList要移动数据。</li>
<li>ArrayList和LinkedListed都是非线程安全的，但可通过工具类Collections中的synchronizedList方法转换成线程安全容器</li>
</ol>
<h3 id="HashMap-和-Hashtable-的区别"><a href="#HashMap-和-Hashtable-的区别" class="headerlink" title="HashMap 和 Hashtable 的区别"></a>HashMap 和 Hashtable 的区别</h3><ol>
<li>继承的父类</li>
</ol>
<ul>
<li>都实现了Map、Cloneable（可复制）、Serializable（可序列化）接口。</li>
<li>HashMap: 继承自AbstractMap类。</li>
<li>HashTable: 继承自Dictionary类。</li>
</ul>
<ol start="2">
<li><p>HashMap 是线程不安全的，效率高；HashTable 线程安全，效率低。</p>
</li>
<li><p>HashMap允许键和值是null，而Hashtable不允许键或者值是null</p>
</li>
</ol>
<h3 id="Iterator-和-ListIterator-的区别"><a href="#Iterator-和-ListIterator-的区别" class="headerlink" title="Iterator 和 ListIterator 的区别"></a>Iterator 和 ListIterator 的区别</h3><ol>
<li>Iterator可用来遍历Set和List集合，但是ListIterator只能用来遍历List。</li>
<li>Iterator对集合只能是前向遍历，ListIterator既可以前向也可以后向。</li>
<li>ListIterator实现了Iterator接口，并包含其他的功能，比如：增加元素，替换元素，获取前一个和后一个元素的索引，等等。</li>
</ol>
<h3 id="Java集合类里面最基本的接口"><a href="#Java集合类里面最基本的接口" class="headerlink" title="Java集合类里面最基本的接口"></a>Java集合类里面最基本的接口</h3><ul>
<li>Collection：代表一组对象，每一个对象都是它的子元素。</li>
<li>Set：不包含重复元素的Collection。</li>
<li>List：有顺序的collection，并且可以包含重复元素。</li>
<li>Map：可以把键(key)映射到值(value)的对象，键不能重复。</li>
</ul>
<h3 id="ConcurrentHashMap"><a href="#ConcurrentHashMap" class="headerlink" title="ConcurrentHashMap"></a>ConcurrentHashMap</h3><ol>
<li>ConcurrentHashMap 类中包含两个静态内部类 HashEntry 和 Segment</li>
<li>HashEntry 用来封装映射表的键 / 值对</li>
<li>Segment 用来充当锁的角色</li>
<li>Concurrenthashmap线程安全的</li>
</ol>
<h3 id="TreeMap"><a href="#TreeMap" class="headerlink" title="TreeMap"></a>TreeMap</h3><ol>
<li>TreeMap是一个有序的key-value集合，基于红黑树（Red-Black tree）的 NavigableMap实现。</li>
<li>该映射根据其键的自然顺序进行排序，或者根据创建映射时提供的 Comparator进行排序，具体取决于使用的构造方法。</li>
<li>红黑树性质：</li>
</ol>
<ul>
<li>每个节点要么是红色，要么是黑色。</li>
<li>根节点永远是黑色的。</li>
<li>所有的叶节点都是空节点（即 null），并且是黑色的。</li>
<li>每个红色节点的两个子节点都是黑色。（从每个叶子到根的路径上不会有两个连续的红色节点）</li>
<li>从任一节点到其子树中每个叶子节点的路径都包含相同数量的黑色节点。</li>
</ul>
<h3 id="HashMap"><a href="#HashMap" class="headerlink" title="HashMap"></a>HashMap</h3><ol>
<li>如果HashMap的key是自定义的类，就必须重写hashcode()和equals()。</li>
<li>HashMap在JDK1.8的版本中引入了红黑树结构做优化</li>
<li>当链表元素个数大于等于8时，链表转换成树结构，小于等于6时，树结构还原成链表。</li>
<li>如果一个HashMap不停的插入、删除元素，并且链表个数在8左右徘徊，就会频繁的发生树转链表、链表转树，效率会很低</li>
</ol>

            </div>
            
                <div class="kratos-copyright text-center clearfix">
                    <h5>本作品采用 <a rel="license nofollow" target="_blank" href="http://creativecommons.org/licenses/by-sa/4.0/">知识共享署名-相同方式共享 4.0 国际许可协议</a> 进行许可</h5>
                </div>
            
            <footer class="kratos-entry-footer clearfix">
                
                    <div class="post-like-donate text-center clearfix" id="post-like-donate">
                    
                    
                        <a class="share" href="javascript:;"><i class="fa fa-share-alt"></i> 分享</a>
                        <div class="share-wrap" style="display: none;">
    <div class="share-group">
        <a href="javascript:;" class="share-plain qq" onclick="share('qq');" rel="nofollow">
            <div class="icon-wrap">
                <i class="fa fa-qq"></i>
            </div>
        </a>
        <a href="javascript:;" class="share-plain qzone" onclick="share('qzone');" rel="nofollow">
            <div class="icon-wrap">
                <i class="fa fa-star"></i>
            </div>
        </a>
        <a href="javascript:;" class="share-plain weixin pop style-plain" rel="nofollow">
            <div class="icon-wrap">
                <i class="fa fa-weixin"></i>
            </div>
            <div class="share-int">
                <div class="qrcode" id="wechat-qr"></div>
                <p>打开微信“扫一扫”，打开网页后点击屏幕右上角分享按钮</p>
            </div>
        </a>
        <a href="javascript:;" class="share-plain weibo" onclick="share('weibo');" rel="nofollow">
            <div class="icon-wrap">
                <i class="fa fa-weibo"></i>
            </div>
        </a>
        <a href="javascript:;" class="share-plain facebook style-plain" onclick="share('facebook');" rel="nofollow">
            <div class="icon-wrap">
                <i class="fa fa-facebook"></i>
            </div>
        </a>
        <a href="javascript:;" class="share-plain twitter style-plain" onclick="share('twitter');" rel="nofollow">
            <div class="icon-wrap">
                <i class="fa fa-twitter"></i>
            </div>
        </a>
    </div>
    <script type="text/javascript">
        $(()=>{
            new QRCode("wechat-qr", {
                text: "https://yongkj.gitee.io/blog/2021/01/29/java-assemble/",
                width: 150,
                height: 150,
                correctLevel : QRCode.CorrectLevel.H
            });
        });
        function share(dest) {
            const qqBase        = "https://connect.qq.com/widget/shareqq/index.html?";
            const weiboBase     = "https://service.weibo.com/share/share.php?";
            const qzoneBase     = "https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?";
            const facebookBase  = "https://www.facebook.com/sharer/sharer.php?";
            const twitterBase   = "https://twitter.com/intent/tweet?";
            const hostUrl       = "https://yongkj.gitee.io/blog/2021/01/29/java-assemble/";
            const title         = "「集合」";
            const excerpt       = `集合的分类123456789101112131415161718Collection 接口的接口 对象的集合（单列集合）├——-List 接口：元素按进入先后有序保存，可重复│—————-├ LinkedList 接口实现类， 链表，...`;
            let _URL;
            switch (dest) {
                case "qq"       : _URL = qqBase+"url="+hostUrl+"&title="+title+"&desc=&summary="+excerpt+"&site=cxpy";     break;
                case "weibo"    : _URL = weiboBase+"url="+hostUrl+"&title="+title+excerpt;                                 break;
                case "qzone"    : _URL = qzoneBase+"url="+hostUrl+"&title="+title+"&desc=&summary="+excerpt+"&site=cxpy";  break;
                case "facebook" : _URL = facebookBase+"u="+hostUrl;                                                        break;
                case "twitter"  : _URL = twitterBase+"text="+title+excerpt+"&url="+hostUrl;                                break;
            }
            window.open(_URL);
        };
    </script>
</div>
                    
                    </div>
                
                <div class="footer-tag clearfix">
                    <div class="pull-left">
                    <i class="fa fa-tags"></i>
                        <a class="tag-none-link" href="/blog/tags/%E5%85%83%E7%B4%A0/" rel="tag">元素</a>, <a class="tag-none-link" href="/blog/tags/%E5%90%8C%E6%AD%A5/" rel="tag">同步</a>, <a class="tag-none-link" href="/blog/tags/%E6%95%B0%E7%BB%84/" rel="tag">数组</a>, <a class="tag-none-link" href="/blog/tags/%E9%93%BE%E8%A1%A8/" rel="tag">链表</a>
                    </div>
                    <div class="pull-date">
                    <span>最后编辑：2021-02-10</span>
                    </div>
                </div>
            </footer>
        </div>
        
            <nav class="navigation post-navigation clearfix" role="navigation">
                
                <div class="nav-previous clearfix">
                    <a title=" 基础汇总" href="/blog/2021/01/06/java-based-summary/">&lt; 上一篇</a>
                </div>
                
                
                <div class="nav-next clearfix">
                    <a title=" 线程" href="/blog/2021/01/30/java-thread/">下一篇 &gt;</a>
                </div>
                
            </nav>
        
        
    </article>
</section>
        </div>
                
            <section id="kratos-widget-area" class="col-md-4 hidden-xs hidden-sm">
                
                    <aside id="krw-about" class="widget widget-kratos-about clearfix">
    
    <div class="photo-background"></div>
    <div class="photo-wrapper clearfix">
        <div class="photo-wrapper-tip text-center">
            <img class="about-photo" src="/blog/images/avatar.webp" />
        </div>
    </div>
    <div class="textwidget">
        
            <ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%9B%86%E5%90%88%E7%9A%84%E5%88%86%E7%B1%BB"><span class="toc-number">1.</span> <span class="toc-text">集合的分类</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#List%E3%80%81Map%E3%80%81Set-%E6%8E%A5%E5%8F%A3%E5%AD%98%E5%8F%96%E5%85%83%E7%B4%A0%E7%89%B9%E7%82%B9"><span class="toc-number">2.</span> <span class="toc-text">List、Map、Set  接口存取元素特点</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Collection-%E5%92%8C-Collections-%E7%9A%84%E5%8C%BA%E5%88%AB"><span class="toc-number">3.</span> <span class="toc-text">Collection 和 Collections 的区别</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#ArrayList-%E5%92%8C-LinkedList-%E7%9A%84%E5%8C%BA%E5%88%AB"><span class="toc-number">4.</span> <span class="toc-text">ArrayList 和 LinkedList 的区别</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#HashMap-%E5%92%8C-Hashtable-%E7%9A%84%E5%8C%BA%E5%88%AB"><span class="toc-number">5.</span> <span class="toc-text">HashMap 和 Hashtable 的区别</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Iterator-%E5%92%8C-ListIterator-%E7%9A%84%E5%8C%BA%E5%88%AB"><span class="toc-number">6.</span> <span class="toc-text">Iterator 和 ListIterator 的区别</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Java%E9%9B%86%E5%90%88%E7%B1%BB%E9%87%8C%E9%9D%A2%E6%9C%80%E5%9F%BA%E6%9C%AC%E7%9A%84%E6%8E%A5%E5%8F%A3"><span class="toc-number">7.</span> <span class="toc-text">Java集合类里面最基本的接口</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#ConcurrentHashMap"><span class="toc-number">8.</span> <span class="toc-text">ConcurrentHashMap</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#TreeMap"><span class="toc-number">9.</span> <span class="toc-text">TreeMap</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#HashMap"><span class="toc-number">10.</span> <span class="toc-text">HashMap</span></a></li></ol>
        
    </div>
</aside>
                
                    <!-- Moved to about.ejs -->
                
                    
  <aside id="krw-categories" class="widget widget-categories clearfix">
    <h4 class="widget-title"><i class="fa fa-folder"></i>分类目录</h4>
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/blog/categories/Java%E5%AD%A6%E4%B9%A0/">Java学习</a><span class="category-list-count">16</span></li><li class="category-list-item"><a class="category-list-link" href="/blog/categories/%E7%AC%AC%E4%B8%80%E6%AC%A1/">第一次</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/blog/categories/%E8%8B%B1%E8%AF%AD%E5%AD%A6%E4%B9%A0/">英语学习</a><span class="category-list-count">8</span></li><li class="category-list-item"><a class="category-list-link" href="/blog/categories/%E9%9F%B3%E4%B9%90%E7%A9%BA%E9%97%B4/">音乐空间</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/blog/categories/%E9%A1%B9%E7%9B%AE%E7%BB%8F%E5%8E%86/">项目经历</a><span class="category-list-count">3</span></li></ul>
  </aside>


                
                    
  <aside id="krw-tags" class="widget widget-kratos-tags clearfix">
    <h4 class="widget-title"><i class="fa fa-tags"></i>标签聚合</h4>
      <div class="tag-clouds">
        <a href="/blog/tags/apility/" style="font-size: 0.6em;">apility</a> <a href="/blog/tags/bus/" style="font-size: 0.6em;">bus</a> <a href="/blog/tags/city/" style="font-size: 0.6em;">city</a> <a href="/blog/tags/comfort/" style="font-size: 0.6em;">comfort</a> <a href="/blog/tags/communication/" style="font-size: 0.6em;">communication</a> <a href="/blog/tags/contribute/" style="font-size: 0.6em;">contribute</a> <a href="/blog/tags/convenient/" style="font-size: 0.6em;">convenient</a> <a href="/blog/tags/develop/" style="font-size: 0.6em;">develop</a> <a href="/blog/tags/education/" style="font-size: 0.6em;">education</a> <a href="/blog/tags/enhance/" style="font-size: 0.6em;">enhance</a> <a href="/blog/tags/facility/" style="font-size: 0.6em;">facility</a> <a href="/blog/tags/flight/" style="font-size: 0.6em;">flight</a> <a href="/blog/tags/foreign/" style="font-size: 0.6em;">foreign</a> <a href="/blog/tags/free/" style="font-size: 0.6em;">free</a> <a href="/blog/tags/hello/" style="font-size: 0.6em;">hello</a> <a href="/blog/tags/improve/" style="font-size: 0.8em;">improve</a> <a href="/blog/tags/information/" style="font-size: 0.6em;">information</a> <a href="/blog/tags/invest/" style="font-size: 0.6em;">invest</a>
      </div>
  </aside>

                
                    
  <aside id="krw-posts" class="widget widget-kratos-poststab">
  <h4 class="widget-title"><i class="fa fa-file"></i>最新文章</h4>
  <div class="tab-content">
      <ul class="list-group">
        
        
          
          
            <a class="list-group-item" href="/blog/2021/02/12/java-dynamic-proxy/"><i class="fa  fa-book"></i> 动态代理</a>
            
          
        
          
          
            <a class="list-group-item" href="/blog/2021/02/12/java-constructor/"><i class="fa  fa-book"></i> 构造器的注入与使用</a>
            
          
        
          
          
            <a class="list-group-item" href="/blog/2021/02/12/java-ioc-di/"><i class="fa  fa-book"></i> 控制反转与依赖注入</a>
            
          
        
          
          
            <a class="list-group-item" href="/blog/2021/02/09/java-io-stream/"><i class="fa  fa-book"></i> 输入输出流</a>
            
          
        
          
          
            <a class="list-group-item" href="/blog/2021/02/08/java-class-loading/"><i class="fa  fa-book"></i> 类加载</a>
            
          
        
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
          
            
      </ul>
  </div>
  </aside>

                
            </section>
        
        </div>
    </div>
</div>
<footer>
    <div id="footer">
        <div class="kr-tool text-center">
            <div class="tool">
                
                    <div class="box search-box">
                        <a href="/blog/search/">
                            <span class="fa fa-search"></span>
                        </a>
                    </div>
                
                
                    <div class="box theme-box" id="darkmode-switch">
                        <span class="fa fa-adjust"></span>
                    </div>
                
                
            </div>
            <div class="box gotop-box">
                <span class="fa fa-chevron-up"></span>
            </div>
        </div>
        <div class="container">
            <div class="row">
                <div class="col-md-6 col-md-offset-3 footer-list text-center">
                    <ul class="kratos-social-icons">
                        
                        
                        <li><a target="_blank" rel="nofollow" href="https://t.me/CandyUnion"><i class="fa fa-telegram"></i></a></li>
                        <li><a target="_blank" rel="nofollow" href="https://twitter.com/Candiinya"><i class="fa fa-twitter"></i></a></li>
                        
                        
                        
                        <li><a target="_blank" rel="nofollow" href="https://github.com/yongkj"><i class="fa fa-github"></i></a></li>
                        <li><a target="_blank" rel="nofollow" href="/blog/atom.xml"><i class="fa fa-rss"></i></a></li>
                    </ul>
                    <ul class="kratos-copyright">
                        <div>
                            <li>&copy; 2021 yongkj 版权所有.</li>
                            <li>本站已运行<span id="span_dt">Loading...</span></li>
                        </div>
                        <div>
                            <li>Theme <a href="https://github.com/Candinya/Kratos-Rebirth" target="_blank">Kratos:Rebirth</a></li>
                            <li>Made with&nbsp;<i class="fa fa-heart throb" style="color:#d43f57"></i>&nbsp;by <a href="https://candinya.com" target="_blank" rel="nofollow">Candinya</a>.</li>
                        </div>
                        <div>
                            <li>Powered by <a href="https://hexo.io" target="_blank" rel="nofollow">Hexo</a></li>
                            <li>Hosted on <a href="https://www.yongkj.cn" target="_blank">勇往直前</a></li>
                        </div>
                        <div>
                            
                            
                        </div>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</footer>
</div>
</div>

        <script defer src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.4/dist/js/bootstrap.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.js"></script>
<script>const notMobile = (!(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)));</script>

    <div>
        <canvas id="snow"></canvas>
        <script async type="text/javascript" src="/blog/js/snow.min.js"></script>
    </div>

<script async src="/blog/js/candy.min.js"></script>


    <script defer src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>

<script defer src="https://cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js"></script>
<script defer src="/blog/js/kratosr.min.js"></script>
<script defer src="/blog/js/pjax.min.js"></script>


    <script defer src="/blog/js/kr-dark.min.js"></script>



    </body>
</html>